package at.ac.lbg.media.vis.client.theme.view
{
	import flare.vis.data.NodeSprite;
	
	import mx.collections.ArrayCollection;
	
	public class ArtworkDetail extends NodeSprite {
		public var id:Number;
		public var title:String;
		public var year:int;
		public var nica:Boolean;
		public var authors:String;
    	public var introductionG:String;
    	public var introductionE:String;
    	public var imgFileName:String;
		public var categories:ArrayCollection = new ArrayCollection();
		
		public function ArtworkDetail(obj:Object) {
			super();
			id = obj.id;
			title = obj.title;
			year = obj.year;
			nica = obj.nica != 0;
			authors = obj.authors;
			introductionG = obj.introductionG;
			introductionE = obj.introductionE;
			imgFileName = obj.imgFileName;
			var cats:ArrayCollection = obj.categories;
			for (var i:int = 0; i < cats.length; i++) {
				categories.addItem(new Category(cats[i]));
			}

		}
		
	}
}